package com.skyjing.toolsuitls.java.tools;

import android.os.Environment;

import java.io.File;

public class FilesUitls {

    /**
     * 获取SDCard的路径
     * @return
     */
    public static String getSDPath(){
        File sdDir = null;
        //判断sd卡是否存在
        boolean sdCardExist = Environment.getExternalStorageState()
                .equals(android.os.Environment.MEDIA_MOUNTED);
        if(sdCardExist)
        {
            //获取跟目录
            sdDir = Environment.getExternalStorageDirectory();
        }
        return sdDir.toString() + File.separator;
    }
}
